const express = require('express');
const router = express.Router();
const constants = require('../db/constants');
const upwardsController = require('../controller/v1/upwards');

/**
 * @api {get} /upwards/load 加载级连设置
 * @apiDescription 加载级连设置
 * @apiName UpwardsLoad
 * @apiGroup 设置项管理
 * @apiVersion 1.0.0
 */
router.get(constants.version + 'upwards/load', upwardsController.load);

/**
 * @api {post} /upwards/save 保存级连设置
 * @apiDescription 保存级连设置
 * @apiName UpwardsSave
 * @apiGroup 设置项管理
 * @apiParam {string} sip_command_account 服务器sip帐号
 * @apiParam {string} sip_command_password 服务器sip密码
 * @apiParam {string} server_realm 服务器sip域
 * @apiParam {string} sip_command_host 服务器sip ip地址
 * @apiParam {int} keep_alive 心跳时间
 * @apiVersion 1.0.0
 */
router.post(constants.version+ 'upwards/save', upwardsController.save);

module.exports = router;